<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;


/**
 * @mixin \think\Model
 * @property int $id
 * @property string $openid
 * @property string $nickname
 * @property string $avatar
 * @property string $token
 * @property string $last_login
 * @property string $mobile
 */
class UserDao extends Model
{
    protected $table = 'user';
    protected $autoWriteTimestamp = 'datetime';
    // 定义时间戳字段名
    protected $createTime = 'create_at';
    protected $updateTime = 'update_at';

    public function distribute()
    {
        return $this->hasMany(UserDao::class,'pid','id');
    }
}
